package com.xuxin.baby.fragment.menu;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xuxin.baby.R;
import com.xuxin.baby.activity.ChildDataActivity;
import com.xuxin.baby.activity.ChildRiskActivity;
import com.xuxin.baby.activity.ChildTargetActivity;
import com.xuxin.baby.base.BaseFragment;

import butterknife.OnClick;

/**
 * Created by xu_xin
 * Created on 2020/12/22 0022
 * 首页 -> 功能
 */
public class MenuFragment extends BaseFragment {

    public static MenuFragment newInstance() {
        return new MenuFragment();
    }

    @Override
    public View setContentView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) {
        return inflater.inflate(R.layout.fragment_menu, container, false);
    }

    @Override
    public void initView() {
    }

    @Override
    public void initData() {

    }

    @Override
    public void onComplete() {

    }

    @Override
    @OnClick({R.id.fragment_menu_child, R.id.fragment_menu_target, R.id.fragment_menu_risk,
            R.id.fragment_menu_five, R.id.fragment_menu_height, R.id.fragment_menu_sufficient,
            R.id.fragment_menu_heart})
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.fragment_menu_child) {
            ActivityUtils.startActivity(ChildDataActivity.class);
        } else if (id == R.id.fragment_menu_target) {
            ActivityUtils.startActivity(ChildTargetActivity.class);
        } else if (id == R.id.fragment_menu_risk) {
            ActivityUtils.startActivity(ChildRiskActivity.class);
        } else if (id == R.id.fragment_menu_five) {
            ToastUtils.showShort("功能完善中...");
        } else if (id == R.id.fragment_menu_height) {
            ToastUtils.showShort("功能完善中...");
        } else if (id == R.id.fragment_menu_sufficient) {
            ToastUtils.showShort("功能完善中...");
        } else if (id == R.id.fragment_menu_heart) {
            ToastUtils.showShort("功能完善中...");
        }
    }
}